package com.kt.emall.order.config;

import com.kt.emall.order.interceptor.UserLoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @program: e-mall
 * @description: 订单页面配置
 * @author: KamTang
 * @create: 2022-02-10 09:01
 **/
@Configuration
public class OrderWebConfig implements WebMvcConfigurer {

    @Autowired
    UserLoginInterceptor userLoginInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(userLoginInterceptor).addPathPatterns("/**");
    }
}
